﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SkillifyMaster.master" AutoEventWireup="true" CodeFile="ManageGroups.aspx.cs" Inherits="Admin_ManageGroups" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
        .style1
        {
            width: 100%;
        }
    .style2
    {
        width: 494px;
    }
    .style5
    {
        width: 219px;
    }
    .style6
    {
        width: 75px;
    }
    .style7
    {
        width: 216px;
    }
    .style8
    {
        height: 30px;
    }
    .style9
    {
        width: 75px;
        height: 31px;
    }
    .style10
    {
        width: 216px;
        height: 29px;
    }
    .style11
    {
        width: 219px;
        height: 31px;
    }
    .style12
    {
        width: 216px;
        height: 31px;
    }
    .style13
    {
        width: 75px;
        height: 70px;
    }
    .style14
    {
        width: 216px;
        height: 70px;
    }
    .style15
    {
        width: 75px;
        height: 30px;
    }
    .style16
    {
        width: 216px;
        height: 30px;
    }
    .style17
    {
        width: 75px;
        height: 28px;
    }
    .style18
    {
        width: 216px;
        height: 28px;
    }
    .style19
    {
        width: 75px;
        height: 41px;
    }
    .style20
    {
        width: 216px;
        height: 41px;
    }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="style1">
        <tr>
            <td class="style2">
            </td>
            <td align="right">
            <h2>Manage Groups</h2>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <table class="style1" frame="border" cellspacing="2" style="border: 4px outset orange;">
                    <tr>
                        <td align="center" colspan="3" class="style8">
                                <asp:Label ID="lblGrInfo" runat="server" Font-Size="Small" Text="Add/Edit  Group Information"></asp:Label>
                        </td>
                    </tr>

                    <tr>
                        <td class="style9">
                            <asp:Label ID="lblGroupName" runat="server" Text="Group Name"></asp:Label>
                        </td>

                        <td class="style12">
                            <asp:TextBox ID="txtGroupName" runat="server" Width="170px" AutoPostBack="True" 
                                ontextchanged="txtGroupName_TextChanged"></asp:TextBox>
                        &nbsp;
                            <asp:RequiredFieldValidator ID="rfvGName" runat="server" ControlToValidate="txtGroupName"
                                    ErrorMessage="Group Name Cannot be Empty" ForeColor="Red">*</asp:RequiredFieldValidator>
                        </td>

                        <td class="style11">
                            <asp:Label ID="lablUser" runat="server" Text="User"></asp:Label>
                        </td>
                    </tr>

                    <tr>
                        <td class="style13">
                            <asp:Label ID="lblDesc" runat="server" Text="Description"></asp:Label>
                        </td>

                        <td class="style14">
                            <asp:TextBox ID="txtDesc" runat="server" Height="60px" TextMode="MultiLine" Width="170px"></asp:TextBox>
                        </td>

                        <td rowspan="6" valign="top" class="style5">

                            <asp:CheckBoxList ID="chkUserList" runat="server">
                            </asp:CheckBoxList>

                        </td>
                    </tr>

                    <tr>
                        <td class="style15">
                            <asp:Label ID="lblCount" runat="server" Text="No. of Users" Visible="False"></asp:Label>
                        </td>

                        <td class="style16">
                            <asp:Label ID="lblCountResult" runat="server"></asp:Label>
                        </td>

                    </tr>

                    <tr>
                        <td class="style17">
                        </td>

                        <td class="style18">
                            <asp:CheckBox ID="chkIsActive" runat="server" Text="Is Active" />
                        </td>

                    </tr>

                    <tr>
                        <td class="style19">
                        </td>

                        <td class="style20">
                            <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit"
                                    Width="63px" BackColor="#E49642" BorderColor="#CC7A24" ForeColor="White" />
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="btnClear" runat="server" OnClick="btnClear_Click" Text="Clear" Width="63px"
                                    BackColor="#E49642" BorderColor="#CC7A24" CausesValidation="False" ForeColor="White" />
                        </td>

                    </tr>

                    <tr>
                        <td class="style6">
                        </td>

                        <td class="style7">
                            <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
                        </td>

                    </tr>

                     <tr>
                        <td class="style6">
                        </td>

                        <td class="style7">
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" 
                                Width="236px" />
                        </td>

                    </tr>

                                        


                </table>
            </td>

            <td align="left">
                <table class="style1">
                        <tr>
                            <td align="center">
                                <asp:Label ID="lblAvailGroups" runat="server" Font-Size="Small" Text="Available Groups"
                                    Font-Bold="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" class="style10" valign="top">
                                <asp:GridView ID="GVAvailGroups" runat="server"
                                    BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" AutoGenerateColumns="False"
                                    DataKeyNames="Group ID" ForeColor="Black" GridLines="None" AllowPaging="True"
                                    CellPadding="2" 
                                    onselectedindexchanged="GVAvailGroups_SelectedIndexChanged" Width="450px">
                                    <RowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <AlternatingRowStyle BackColor="PaleGoldenrod" />
                                    <Columns>
                                        <asp:BoundField DataField="Group ID" HeaderText="Group ID" SortExpression="Group ID" />
                                        <asp:ButtonField ButtonType="Link" DataTextField="Group Name" HeaderText="Group Name"
                                            SortExpression="Group Name" CommandName="Select" ItemStyle-Font-Underline="true">
                                            <ItemStyle Font-Underline="True"></ItemStyle>
                                        </asp:ButtonField>
                                        <asp:BoundField DataField="Is Active" HeaderText="Is Active" SortExpression="Is Active" />
                                    </Columns>
                                    <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <EmptyDataRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <FooterStyle BackColor="Tan" />
                                    <HeaderStyle BackColor="#CB6811" Font-Bold="True" ForeColor="White" 
                                        VerticalAlign="Middle" HorizontalAlign="Center" />
                                    <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
                                    <RowStyle />
                                    <SelectedRowStyle BackColor="#E49642" ForeColor="GhostWhite" />
                                    <SortedAscendingCellStyle BackColor="#FAFAE7" />
                                    <SortedAscendingHeaderStyle BackColor="#DAC09E" />
                                    <SortedDescendingCellStyle BackColor="#E1DB9C" />
                                    <SortedDescendingHeaderStyle BackColor="#C2A47B" />
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                    </table>
            </td>
        </tr>
    </table>
</asp:Content>

